using System;
using System.Collections.Generic;
using System.Linq;
using SqlSugar;
namespace Zhao.Models.Entity
{
    /// <summary>
    /// 结算记录实体
    /// </summary>
    [SugarTable("SettlementRecord")]
    public class SettlementRecord
    {
        /// <summary>
        /// 结算ID
        /// </summary>
        [SugarColumn(ColumnName = "SettlementID", IsPrimaryKey = true, IsIdentity = true)]
        public int SettlementID { get; set; }

        /// <summary>
        /// 结算类型 (1-活动结算, 3-预约结算)
        /// </summary>
        [SugarColumn(ColumnName = "SettlementType")]
        public short SettlementType { get; set; }

        /// <summary>
        /// 关联ID (活动ID或预约ID)
        /// </summary>
        [SugarColumn(ColumnName = "RelatedID")]
        public int RelatedID { get; set; }

        /// <summary>
        /// 场馆ID
        /// </summary>
        [SugarColumn(ColumnName = "VenueID")]
        public Guid VenueID { get; set; }

        /// <summary>
        /// 结算金额
        /// </summary>
        [SugarColumn(ColumnName = "Amount")]
        public decimal Amount { get; set; }

        /// <summary>
        /// 结算时间
        /// </summary>
        [SugarColumn(ColumnName = "SettlementTime")]
        public DateTime SettlementTime { get; set; }

        /// <summary>
        /// 结算状态 (1-成功, 3-失败)
        /// </summary>
        [SugarColumn(ColumnName = "Status")]
        public short Status { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(ColumnName = "CreatedAt")]
        public DateTime CreatedAt { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        [SugarColumn(ColumnName = "UpdatedAt", IsNullable = true)]
        public DateTime? UpdatedAt { get; set; }

        /// <summary>
        /// 订单ID (如果有)
        /// </summary>
        [SugarColumn(ColumnName = "OrderID", IsNullable = true)]
        public int? OrderID { get; set; }

        /// <summary>
        /// 账单ID (关联Bill表)
        /// </summary>
        [SugarColumn(ColumnName = "BillID", IsNullable = true)]
        public int? BillID { get; set; }

        /// <summary>
        /// 结算描述
        /// </summary>
        [SugarColumn(ColumnName = "Description", IsNullable = true)]
        public string Description { get; set; }

        /// <summary>
        /// 结算编号（业务流水号）
        /// </summary>
        [SugarColumn(ColumnName = "SettlementNo")]
        public string SettlementNo { get; set; }
    }
} 